include ../../rpcsys.mk

src_dirs = proto client serv

all: 
	@for subdir in $(src_dirs); \
	do \
		if ! [ -d $$subdir ]; then echo "[$$subdir] is not exist!"; exit -1; fi; \
		make -C $$subdir; \
		if [ $$? -ne 0 ]; then echo "build [$$subdir] failed"; exit -1; else echo "build [$$subdir] successed"; fi \
	done
	
clean:
	@(for i in $(src_dirs); do ( cd $$i && make clean ); done)
